﻿using Mono.Cecil;

public abstract class LuaVarReference
{
    private readonly LuaModuleDefinition _module;
    public LuaModuleDefinition Module => _module;
    protected LuaTypeReference GetTypeReference(string fullName)
        => _module.GetTypeReference(fullName);
    protected LuaTypeReference? GetTypeReference(TypeReference type)
        => _module.GetTypeReference(type);

    protected LuaVarReference(LuaModuleDefinition module)
    {
        _module = module;
        Name = Empty;
    }
    public abstract ObjectKind StackType { get; }
    public virtual string Name { get; protected set; }
    public override string ToString()
    {
        return Name;
    }
}
